package com.example.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import lombok.Data;

/**
 * 分页查询请求DTO
 * 用于讲座列表的分页查询
 */
@Data
@Schema(description = "分页查询请求数据传输对象")
public class PageQueryRequestDTO {

    @Schema(description = "页码，从1开始", example = "1")
    @Min(value = 1, message = "页码必须大于0")
    private Integer pageNum = 1;

    @Schema(description = "每页大小", example = "10")
    @Min(value = 1, message = "每页大小必须大于0")
    @Max(value = 100, message = "每页大小不能超过100")
    private Integer pageSize = 10;

    @Schema(description = "排序字段", example = "startTime")
    private String sortBy = "createdTime";

    @Schema(description = "排序方向", example = "DESC")
    private String sortDirection = "DESC";

    @Schema(description = "搜索关键词", example = "Java")
    private String keyword;

    @Schema(description = "讲座状态筛选", example = "0")
    private Integer lectureStatus;

    @Schema(description = "讲座类型筛选", example = "技术分享")
    private String lectureType;

    @Schema(description = "主讲人筛选", example = "张教授")
    private String lecturer;
}